from core.data_processor import process_comments_to_profiles
import sys

def main():
    if len(sys.argv) != 3:
        print("使用方法: python process_comments.py <评论数据CSV文件路径> <输出配置文件路径>")
        sys.exit(1)
        
    csv_path = sys.argv[1]
    output_path = sys.argv[2]
    
    try:
        process_comments_to_profiles(csv_path, output_path)
        print(f"成功处理评论数据并生成配置文件：{output_path}")
    except Exception as e:
        print(f"处理过程中出现错误：{str(e)}")
        sys.exit(1)
        
if __name__ == "__main__":
    main() 